﻿using Dora.Orm.Core.Domain.Entities;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;

namespace Dora.Services.AdminUser.Entities
{
    /// <summary>
    /// 组织机构表实体对象
    /// </summary>
    [SugarTable("organization")]
    public class OrganizationEntity : Entity<int>
    {
        /// <summary>
        /// 组织机构名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 级别序号
        /// </summary>
        public int LevelIdx { get; set; }

        /// <summary>
        /// 简称
        /// </summary>
        public string ShortName { get; set; }

        /// <summary>
        /// 简称首字母缩写
        /// </summary>
        public string ShortCode { get; set; }

        /// <summary>
        /// 层级路径;从最祖宗到本级,英文逗号分隔
        /// </summary>
        public string LevelPath { get; set; }

        /// <summary>
        /// 根节点Id;顶级根节点Id 2019-06-25新增字段
        /// </summary>
        public int RootId { get; set; }

        /// <summary>
        /// 上级Id
        /// </summary>
        public int ParentId { get; set; }

        /// <summary>
        /// 排序;升序
        /// </summary>
        public long Sort { get; set; }

        /// <summary>
        /// 是否包含子机构
        /// </summary>
        public short HasSub { get; set; }

        /// <summary>
        /// 机构级别;组织机构级别 0：总（大）社，1：分社，2：门店，3：直属门店，4：直属部门。
        /// </summary>
        public int OrgLevel { get; set; }

        /// <summary>
        /// 机构类别 0：总（大）社，1：直属门店 2：分销商，3：直属部门
        /// </summary>
        public int OrgType { get; set; }

        /// <summary>
        /// 统一社会信用代码
        /// </summary>
        public string CreditCode { get; set; }

        /// <summary>
        /// 旅行社许可证;旅行社许可证
        /// </summary>
        public string BizLicenseKey { get; set; }

        /// <summary>
        /// 负责人
        /// </summary>
        public string LeaderName { get; set; }

        /// <summary>
        /// 身份证号
        /// </summary>
        public string LeaderIDCardNumber { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        public string LeaderPhone { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        public string EmailAddress { get; set; }

        /// <summary>
        /// 保证金
        /// </summary>
        public decimal DepositMoney { get; set; }

        /// <summary>
        /// 门店是否编辑出团通知书;0:否，1:是
        /// </summary>
        public short IsNeedStoreEdit { get; set; }

        /// <summary>
        /// 【总社】是否需要纸质合同;0:否，1:是
        /// </summary>
        public short IsNeedPaperContract { get; set; }

        /// <summary>
        /// 纳税类型;10：非独立纳税，11：独立纳税
        /// </summary>
        public int TaxPaymentType { get; set; }

        /// <summary>
        /// 是否允许签约供应商;20:不允许签约供应商，21:允许签约供应商
        /// </summary>
        public short IsAllowContractSupplier { get; set; }

        /// <summary>
        /// 【分社】是否允许更换保险 字段含义变更：30:不允许更换保险，31:允许更换保险
        /// </summary>
        public short IsContractInsuranceSupplier { get; set; }

        /// <summary>
        /// 【分社】是否允许独立结算;60:不允许，61:允许
        /// </summary>
        public short IsAllowSettlementBySelf { get; set; }

        /// <summary>
        /// 是否允许开设门店;40:否，不允许，41:是，允许
        /// </summary>
        public short IsAllowOpenStores { get; set; }

        /// <summary>
        /// 门店是否需要审批;50:否，不需要审批，51:是，需要审批
        /// </summary>
        public short IsAllowAudit { get; set; }

        /// <summary>
        /// 授信额度
        /// </summary>
        public decimal GrantingCredit { get; set; }

        /// <summary>
        /// 资金池预警阈值
        /// </summary>
        public decimal WarningEdgeValue { get; set; }

        /// <summary>
        /// 标签Id列表
        /// </summary>
        public string TagIds { get; set; }

        /// <summary>
        /// 标签名称列表
        /// </summary>
        public string TagNames { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 机构所在省份Id
        /// </summary>
        public int? ProvinceId { get; set; }

        /// <summary>
        /// 机构所在省份名称
        /// </summary>
        public string ProvinceName { get; set; }

        /// <summary>
        /// 机构所在城市Id
        /// </summary>
        public int? CityId { get; set; }

        /// <summary>
        /// 机构所在城市名称
        /// </summary>
        public string CityName { get; set; }

        /// <summary>
        /// 机构所在区(县)Id
        /// </summary>
        public int? DistrictId { get; set; }

        /// <summary>
        /// 机构所在区(县)名称
        /// </summary>
        public string DistrictName { get; set; }

        /// <summary>
        /// 机构所在镇(乡)Id
        /// </summary>
        public int TownId { get; set; }

        /// <summary>
        /// 机构所在镇(乡)名称
        /// </summary>
        public string TownName { get; set; }

        /// <summary>
        /// 详细地址
        /// </summary>
        public string Address { get; set; }

        /// <summary>
        /// 纬度
        /// </summary>
        public decimal Latitude { get; set; }

        /// <summary>
        /// 经度
        /// </summary>
        public decimal Longitude { get; set; }

        /// <summary>
        /// 已签约的供应商数量 2019-06-10新增字段
        /// </summary>
        public int SupplierCount { get; set; }

        /// <summary>
        /// 是否禁用 2019-05-14新增字段
        /// </summary>
        public short IsDisabled { get; set; }

        /// <summary>
        /// 是否冻结 2019-05-14新增字段
        /// </summary>
        public short IsFrozen { get; set; }

        /// <summary>
        /// 冻结类型;0:正常未冻结，1:单体冻结，2:全部冻结 2019-07-15新增字段
        /// Modified By TTTan In 20190822 单体冻结和全部冻结仅表示操作，状态只有一个冻结状态，不再区分单体冻结和全部冻结,此字段暂时弃用
        /// </summary>
        public int? FreezeType { get; set; }

        /// <summary>
        /// 是否被删除
        /// </summary>
        public short IsDeleted { get; set; }

        /// <summary>
        /// 创建人Id
        /// </summary>
        public Guid? CreatedUserId { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string CreatedUserName { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedTime { get; set; }

        /// <summary>
        /// 更新人Id
        /// </summary>
        public Guid? UpdatedUserId { get; set; }

        /// <summary>
        /// 更新人
        /// </summary>
        public string UpdatedUserName { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdatedTime { get; set; }

        /// <summary>
        /// 审核状态（门店用）
        /// </summary>
        public short AuditState { get; set; }


        /// <summary>
        /// 企业/门店营业执照(照片url)
        /// </summary>
        public string OrgLicenseKeyUrl { get; set; }

        /// <summary>
        /// 企业Logo(照片url)
        /// </summary>
        public string OrgLogoUrl { get; set; }

        /// <summary>
        /// 企业介绍/门店简介
        /// </summary>
        public string OrgProfile { get; set; }

        /// <summary>
        /// 小程序企业介绍/门店简介
        /// </summary>
        public string MPOrgProfile { get; set; }

        /// <summary>
        /// 【门店】门面照片
        /// </summary>
        public string StorePhoto { get; set; }

        /// <summary>
        /// 【门店】店内照片1
        /// </summary>
        public string InstorePhoto1 { get; set; }

        /// <summary>
        /// 【门店】店内照片2
        /// </summary>
        public string InstorePhoto2 { get; set; }

        /// <summary>
        /// 【门店】店内照片3
        /// </summary>
        public string InstorePhoto3 { get; set; }

        /// <summary>
        /// 资金池金额变动是否需要验证;0:否，1:是
        /// </summary>
        public short IsNeedVerify { get; set; }

        /// <summary>
        /// 资金池金额变动验证阈值
        /// </summary>
        public decimal VerifyEdgeValue { get; set; }
    }
}
